﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Krist_em_up.Plateforms;

namespace Map_Editor.Effects
{
    class EnnemySpawnEffect : ClickEffect
    {
        public override void LeftApply(Krist_em_up.Level.Map map, Microsoft.Xna.Framework.Vector2 coords)
        {
            if (Editor.IsInBounds<Plateform>(map.Plateforms, (int)coords.X, (int)coords.Y)
                && !map.ennemiesSpawnPositions.Contains(coords))
                map.ennemiesSpawnPositions.AddLast(coords);
        }

        public override void RightApply(Krist_em_up.Level.Map map, Microsoft.Xna.Framework.Vector2 coords)
        {
            if (Editor.IsInBounds<Plateform>(map.Plateforms, (int)coords.X, (int)coords.Y))
                map.ennemiesSpawnPositions.Remove(coords);
        }
    }
}
